package com.itheima.nio.buffer.demo02;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;

public class ByteBufferDemo02 {

    public static void main(String[] args) throws UnsupportedEncodingException {

        ByteBuffer byteBuffer = ByteBuffer.allocate(10);
        byteBuffer.put((byte)97);
        System.out.println(byteBuffer);
        System.out.println(byteBuffer.put("abcd".getBytes("UTF-8")));
    }
}
